<?php
/* @var $this StrukturController */
/* @var $model Struktur */
/* @var $form CActiveForm */
global $struktur_org;
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'struktur-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'kode_lokasi');?>
        <?php echo $struktur_org[$model->kode_lokasi]; ?>
		<?php echo $form->error($model,'kode_lokasi'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'laskar'); ?>
		<?php echo $form->hiddenField($model,'laskar'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiAutoComplete',array(
        'name'=>'laskar_auto',
        'source'=>url('struktur/getlist'),
        'value'=> $model->laskar0->nama,
        'options'=>array(
            'showAnim'=>'fold',
            'select' => 'js:function(event, ui){ jQuery("#'.CHtml::activeId($model,'laskar').'").val(ui.item["id"]); }'
        ),
        'htmlOptions'=>array('size'=>'40')
    )); ?>
		<?php echo $form->error($model,'laskar'); ?>
	</div>

	<div class="row buttons">
	<?php echo CHtml::submitButton($model->isNewRecord ? 'Buat' : 'Simpan',array('class'=>'form-submit')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->